package com.kaisa.activity.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.kaisa.activity.BaseApp;

import org.xutils.x;

/**
 * Created by Administrator on 2015/12/12.
 */
public class BaseFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return x.view().inject(this,inflater,container);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        initView();
        initData();
    }

    public void initView() {

    }

    public void initData() {

    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        BaseApp.getInstance().unRegistNetwrokStateReceiver();
    }
}
